// 请求封装

import Request from "../../utils/http";
import { ServerResponse } from "../../utils/serverResponse";

interface LoginParams {
	phone: string,
	password: string
}

export default class Api {
	public async wxLogin(params: { c: string }): Promise<any> {
		const res: ServerResponse<number> = await Request.post('/api/wxLogin', params)
		return res.data
	}

	// 手机号密码登陆
	public async login(params: LoginParams): Promise<any> {
		const res: ServerResponse<number> = await Request.post('/api/login', params)
		return res.data
	}
}